package com.platform.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import com.platform.dao.UserLevelPeriodDao;
import com.platform.entity.UserLevelPeriodEntity;
import com.platform.entity.UserLevelEntity;
import com.platform.service.UserLevelPeriodService;
import com.platform.service.UserLevelService;
import com.platform.service.UserService;
import com.platform.utils.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Service实现类
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2017-08-16 15:02:28
 */
@Service("userLevelPeriodService")
public class UserLevelPeriodServiceImpl implements UserLevelPeriodService {
    @Autowired
    private UserLevelPeriodDao userLevelPeriodDao;

    @Override
    public UserLevelPeriodEntity queryObject(Integer id) {
        return userLevelPeriodDao.queryObject(id);
    }

    @Override
    public List<UserLevelPeriodEntity> queryList(Map<String, Object> map) {
        return userLevelPeriodDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return userLevelPeriodDao.queryTotal(map);
    }

    @Override
    public int save(UserLevelPeriodEntity user) {
        return userLevelPeriodDao.save(user);
    }

    @Override
    public int update(UserLevelPeriodEntity user) {
        return userLevelPeriodDao.update(user);
    }

    @Override
    public int delete(Integer id) {
        return userLevelPeriodDao.delete(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return userLevelPeriodDao.deleteBatch(ids);
    }

    @Override
    public UserLevelPeriodEntity queryLast(Integer userId) {
        return userLevelPeriodDao.queryLast(userId);
    }
}
